﻿{% extends "super.html" %}
{% block title %}员工管理{% endblock %}
{% block s1 %}active{% endblock %}
{% block titlehref %}index{% endblock %}
{% block titlename %}全局动态{% endblock %}
{% block subtitlehref %}{% endblock %}
{% block subtitlename %}员工管理{% endblock %}
{% block content %}
<script type="text/javascript" src="static/myjs/rc.js"></script>
<section id="main-content">
    <section class="wrapper site-min-height">
        <!-- BEGIN ROW  -->
        <div class="row" id="t1">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading">
                        <button class="btn btn-success" disabled>进度查询</button>
                        <span class="tools pull-right">
                        <button onclick="create()" class="btn btn-success" data-toggle="modal" data-target="#myModal">新建进度</button>
                           </span>
                    </header>
                    <div class="panel-body">
                        <div class="adv-table">
                            <table class="display table table-bordered table-striped" id="example">
                                <thead>
                                <tr>
                                    <th>标题</th>
                                    <th>内容</th>
                                    <th>进度</th>
	                                <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {%for i in list%}
                                <tr>
                                    <td style="width: 10%">{{i.Title}}</td>
                                    <td style="width: 15%">{{i.Content}}</td>
	                                <td style="width: 15%">
                                        {%if i.Status == 1%}
		                                引进中
		                                {%endif%}
                                        {%if i.Status == 2%}
                                        已通过
                                        {%endif%}
                                        {%if i.Status == 3%}
                                        不通过
                                        {%endif%}
                                    </td>
	                                <td>
                                        <button onclick="LoadStaff({{i.Id}})" class="btn-info" data-toggle="modal"
                                                data-target="#myModal">编辑
                                        </button>
                                        <button onclick="DeleteStaff({{i.Id}})" class="btn-danger">删除</button>
                                    </td>
                                </tr>
                                {%endfor%}
                                </tbody>
                                <tfoot>
                                <tr>
	                                <th>标题</th>
	                                <th>内容</th>
	                                <th>进度</th>
	                                <th>操作</th>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </section>
            </div>
        </div>

        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel">
                            编辑进度信息
                        </h4>
                    </div>
                    <div class="modal-body">
                        <form id="updatenews" action="rc" method="post">
                            <div class="panel-body">
                                <input id="id" name="id" hidden>
	                            <input id="status" name="status" hidden>
	                            <input id="option" name="option" hidden>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">标题</label>
                                    <input type="text" class="form-control" id="title" name="title"
                                           placeholder="请输入标题">
                                </div>

	                            <div class="form-group">
		                            <label for="exampleInputPassword1">内容</label>
		                            <input type="text" class="form-control" id="content" name="content"
		                                   placeholder="请输入内容">
	                            </div>
                                <div class="form-group">
                                    <p class="text-muted">
                                        进度
                                    </p>
                                    <div class="btn-group" data-toggle="buttons">
                                        <label class="btn btn-default active">
                                            <input class="sex" type="radio" id="option1" checked>
                                            引进中
                                        </label>
                                        <label class="btn btn-default">
                                            <input class="sex" type="radio" id="option2">
                                            已通过
                                        </label>
                                        <label class="btn btn-default">
                                            <input class="sex" type="radio" id="option3">
                                            不通过
                                        </label>
                                    </div>
                                </div>



                            </div>
                        </form>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                        <button id="update" type="button" class="btn btn-primary">
                            提交更改
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <!-- END ROW  -->
    </section>
</section>
<script>
	<!-- DATATABLE JS  -->
	$(document).ready(function () {
		$('#example').dataTable({
			"aaSorting": [[4, "desc"]]
		});
	});
</script>
{% endblock%}